﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Requisitos.aspx.cs" Inherits="Opera_Requisitos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <h1>
        Campañas
    </h1>
    <h2>
        <asp:Label ID="lblTitulo" runat="server" Text="Requisitos de la Actividad"></asp:Label>
    </h2>
    <table style="table-layout:fixed;width:100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td width="160px"></td>
            <td width="70px"></td>
            <td width="80px"></td>
            <td width="70px"></td>

            <td width="230px"></td>

            <td width="160px"></td>
            <td width="80px"></td>
            <td width="24px"></td>
            <td width="36px"></td>
            <td></td>
        </tr>

        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="8" align="right" class="BarraBotones">
                <asp:Button ID="btnCancelar2" runat="server" Text="Cancelar" CssClass="boton" 
                    onclick="btnCancelar_Click" />
            </td>
            <td colspan="2">
            </td>
        </tr>
        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="10">
                <h2>
                    Campaña
                </h2>
            </td>
        </tr>
        <tr>
            <td colspan="10" class="td_alto">
            </td>
        </tr>
        <tr>
            <td class="td_campoRegItem">
                <asp:Label ID="lblCodigoCampanha" runat="server" Text="Código"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtCodigoCampanha" runat="server" CssClass="txtFiltro CajaTextoNumero" Width="100%"></asp:TextBox>
            </td>
            <td></td>
            <td class="td_campoRegItem">
                <asp:Label ID="lblNombreCampanha" runat="server" Text="Nombre"></asp:Label>
            </td>
            <td colspan="4">
                <asp:TextBox ID="txtNombreCampanha" runat="server" CssClass="txtFiltro" Width="100%"></asp:TextBox>
            </td>
            <td></td>
        </tr>
        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="10">
                <h2>
                    Actividad del Plan de Campaña
                </h2>
            </td>
        </tr>
        <tr>
            <td colspan="10" class="td_alto">
            </td>
        </tr>
        <tr>
            <td class="td_campoRegItem">
                <asp:Label ID="lblCodigoActividad" runat="server" Text="Código"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtCodigoActividad" runat="server" CssClass="txtFiltro CajaTextoNumero" Width="100%"></asp:TextBox>
            </td>
            <td></td>
            <td class="td_campoRegItem">
                <asp:Label ID="lblNombreActividad" runat="server" Text="Nombre"></asp:Label>
            </td>
            <td colspan="4">
                <asp:TextBox ID="txtNombreActividad" runat="server" CssClass="txtFiltro" Width="100%"></asp:TextBox>
            </td>
            <td></td>
        </tr>
        <tr>
            <td colspan="10" class="td_alto">
            </td>
        </tr>
        <tr>
            <td class="td_campoRegItem">
                <asp:Label ID="lblCosto" runat="server" Text="Costo (S/.)"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtCosto" runat="server" CssClass="txtFiltro CajaTextoNumero" Width="100%"></asp:TextBox>
            </td>
            <td colspan="6">
            </td>
            <td></td>
        </tr>
        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="5">
                <h2>
                    Lista de Materiales
                </h2>
            </td>
            <td colspan="3">
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td></td>
                        <td width="130px">
                            <div class="buttonGrey">
                                <a runat="server" id="AddMaterial" title="Actividad" class="thickbox">
                                    Agregar Material
                                </a>                        
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
            <td colspan="2">
            </td>
        </tr>
        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="8">
                <asp:UpdatePanel ID="upMateriales" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:GridView   ID="gvMateriales" 
                                        Width="100%" 
                                        runat="server" 

                                        CssClass="mGrid" 
                                        GridLines="None"
                                        PagerStyle-CssClass="pgr"
                                        AlternatingRowStyle-CssClass="alt"

                                        AutoGenerateColumns="False" 
                                        AllowPaging="True" 
                                        PageSize="10"
                                        CellPadding="0" 
                                        onpageindexchanging="gvMateriales_PageIndexChanging" 
                                        onrowcommand="gvMateriales_RowCommand" 
                                        onrowdatabound="gvMateriales_RowDataBound">
                            <Columns>
                                <asp:TemplateField HeaderText="Código">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCodigo" runat="server" Text='<%# Bind("id_material_actividad") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="5%" HorizontalAlign="Left"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Descripción">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDescripcion" runat="server" Text='<%# Bind("nombre_material") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="25%" HorizontalAlign="Left"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Unidad">
                                    <ItemTemplate>
                                        <asp:Label ID="lblUnidadDescripcion" runat="server" Text='<%# Bind("nombre_unidad") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="20%" HorizontalAlign="Left"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Cantidad">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCantidad" runat="server" Text='<%# Bind("cantidad") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="10%" HorizontalAlign="Left"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Costo Por Unidad (S/.)">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCosto" runat="server" Text='<%# Eval("costo", "{0:N}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="10%" HorizontalAlign="Right"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Costo Total (S/.)">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCostoTotal" runat="server" Text='<%# Eval("costo_total", "{0:N}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="10%" HorizontalAlign="Right"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Opciones" ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnVerDetalle" runat="server" CausesValidation="False" CommandName="VER" Height="24px"  Text="Ver Detalle" Width="24px" ImageUrl="~/Img/imgVerDetalle.png" ToolTip="Ver Detalle" Visible="true"/>
                                        <asp:ImageButton ID="btnModificar" runat="server" CausesValidation="False" CommandName="MODIFICAR" Height="24px"  Text="Modificar" Width="24px" ImageUrl="~/Img/imgEditar.png" ToolTip="Modificar" Visible="true"/>
                                        <asp:ImageButton ID="btnEliminar" runat="server" CausesValidation="False" CommandName="ELIMINAR" Height="24px"  Text="Ver Detalle" Width="24px" ImageUrl="~/Img/imgEliminar.png" ToolTip="Eliminar" Visible="true"/>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle HorizontalAlign="Center" Width="20%" />
                                </asp:TemplateField>
                            </Columns>
                            <EmptyDataTemplate>
                                <asp:Label ID="LblVacio" runat="server" Text="No se encontraron datos"></asp:Label>
                            </EmptyDataTemplate>
                            <PagerStyle HorizontalAlign="Center"/>
                        </asp:GridView>
                    </ContentTemplate>  
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="gvMateriales" EventName="PageIndexChanging" />
                        <asp:AsyncPostBackTrigger ControlID="gvMateriales" EventName="RowCommand" />
                    </Triggers>
                </asp:UpdatePanel>

            </td>
            <td colspan="2"">
            </td>
        </tr>
        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="5">
                <h2>
                    Lista de Roles
                </h2>
            </td>
            <td colspan="3">
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td></td>
                        <td width="130px">
                            <div class="buttonGrey">
                                <a runat="server" id="AddRol" title="Actividad" class="thickbox">
                                    &nbsp;&nbsp;&nbsp;&nbsp;Agregar Rol&nbsp;&nbsp;&nbsp;&nbsp;
                                </a>                        
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
            <td colspan="2">
            </td>
        </tr>
        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="8">
                <asp:UpdatePanel ID="upRoles" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:GridView   ID="gvRoles" 
                                        Width="100%" 
                                        runat="server" 

                                        CssClass="mGrid" 
                                        GridLines="None"
                                        PagerStyle-CssClass="pgr"
                                        AlternatingRowStyle-CssClass="alt"

                                        AutoGenerateColumns="False" 
                                        AllowPaging="True" 
                                        PageSize="10"
                                        CellPadding="0" 
                                        onpageindexchanging="gvRoles_PageIndexChanging" 
                                        onrowcommand="gvRoles_RowCommand" 
                                        onrowdatabound="gvRoles_RowDataBound">
                            <Columns>
                                <asp:TemplateField HeaderText="Código">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCodigo" runat="server" Text='<%# Bind("id_rol_actividad") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="5%" HorizontalAlign="Left"/>
                                </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Descripción">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDescripcion" runat="server" Text='<%# Bind("descripcion") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="55%" HorizontalAlign="Left"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Cantidad">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCantidad" runat="server" Text='<%# Bind("cantidad") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="10%" HorizontalAlign="Left"/>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Costo (S/.)">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCosto" runat="server" Text='<%# Eval("costo", "{0:N}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle Width="10%" HorizontalAlign="Right"/>
                                </asp:TemplateField>
                                   
                                <asp:TemplateField HeaderText="Opciones" ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnVerDetalle" runat="server" CausesValidation="False" CommandName="VER" Height="24px"  Text="Ver Detalle" Width="24px" ImageUrl="~/Img/imgVerDetalle.png" ToolTip="Ver Detalle" Visible="true"/>
                                        <asp:ImageButton ID="btnModificar" runat="server" CausesValidation="False" CommandName="MODIFICAR" Height="24px"  Text="Modificar" Width="24px" ImageUrl="~/Img/imgEditar.png" ToolTip="Modificar" Visible="true"/>
                                        <asp:ImageButton ID="btnAsociar" runat="server" CausesValidation="False" CommandName="ASOCIAR" Height="24px"  Text="Asociar Personal" Width="24px" ImageUrl="~/Img/imgRol.png" ToolTip="Asociar Personal" Visible="true"/>
                                        <asp:ImageButton ID="btnEliminar" runat="server" CausesValidation="False" CommandName="ELIMINAR" Height="24px"  Text="Ver Detalle" Width="24px" ImageUrl="~/Img/imgEliminar.png" ToolTip="Eliminar" Visible="true"/>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center"/>
                                    <ItemStyle HorizontalAlign="Center" Width="20%" />
                                </asp:TemplateField>
                            </Columns>
                            <EmptyDataTemplate>
                                <asp:Label ID="LblVacio" runat="server" Text="No se encontraron datos"></asp:Label>
                            </EmptyDataTemplate>
                            <PagerStyle HorizontalAlign="Center"/>
                        </asp:GridView>
                    </ContentTemplate>  
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="gvRoles" EventName="PageIndexChanging" />
                        <asp:AsyncPostBackTrigger ControlID="gvRoles" EventName="RowCommand" />
                    </Triggers>
                </asp:UpdatePanel>

            </td>
            <td colspan="2"">
            </td>
        </tr>
        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="8" align="right" class="BarraBotones">
                <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" CssClass="boton" 
                    onclick="btnCancelar_Click" />
            </td>
            <td colspan="2"">
            </td>
        </tr>
        <tr>
            <td colspan="10">
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>

